import request from '@/utils/request'
// 获取题库列表
export function questionList (params) {
  return request({
    url: '/question/list',
    params
  })
}

// 新增题库
export function questionAdd (data) {
  return request({
    url: '/question/add',
    method: 'POST',
    data
  })
}

// 删除题库
export function questionRemove (id) {
  return request({
    url: '/question/remove',
    method: 'POST',
    data: {
      id
    }
  })
}

// 修改状态
export function questionStatus (id) {
  return request({
    url: '/question/status',
    method: 'POST',
    data: {
      id
    }
  })
}

// 获取单个题目
export function questionOne (id) {
  return request({
    url: '/question/one',
    method: 'POST',
    data: {
      id
    }
  })
}

// 编辑题目
export function questionEdit (data) {
  return request({
    url: '/question/edit',
    method: 'POST',
    data
  })
}
